Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editor hover style margins when Draw Extra Borders is enabled #88652

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

RobProductions
Copy link
Contributor

Fixes #88644

The slight movement seen in the videos provided by @Calinou was caused by a difference in content_margin that was only apparent when the Draw Extra Borders option is enabled. I introduced some extra styles in #86378 and didn't test how they were affected with this option on, apologies for the regression. I've now modified the styles so that the margin matches the "normal" stylebox (for FlatMenuButton and MainScreenButton) which fixes the movement issue:

Capture2024-02-21.21-25-38.mov

I also added in the correct theme type variation to the "Mono build" button in order to stop the border from appearing in the normal state. Let me know if there's anything else I should account for here, thanks!

The content margins for FlatMenuButton and RunBarButton are now handled correctly when the "Draw Extra Borders" user option is enabled
@RobProductions RobProductions requested review from a team as code owners February 22, 2024 04:00
@akien-mga akien-mga requested a review from Calinou February 22, 2024 08:07
@akien-mga akien-mga added this to the 4.3 milestone Feb 22, 2024
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally (rebased on top of master bb6b06c), it works as expected.

simplescreenrecorder-2024-02-26_16.11.11.mp4

@akien-mga akien-mga merged commit 730ef37 into godotengine:master Feb 27, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou
Copy link
Member

Calinou commented Feb 28, 2024

@RobProductions It looks like this change is still needed for the bottom panel, as letters get cut off otherwise:

Screenshot 2024-02-28 201752

Screenshot 2024-02-28 201755

@RobProductions
Copy link
Contributor Author

@Calinou strange, I can't seem to reproduce that on the build I compiled before submitting the PR:

image

image

image

image

I tried with the setting on and off, in multiple themes, with the compact preset, and after restarting Godot but I don't see it. I'll take a look at the bottom panel code & try rebuilding on latest master soon to see if something changed. If it's not something on master, is there anything else that could cause the spacing to be different between our two setups?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text/icons are slightly moved when hovering buttons if Draw Extra Borders editor setting is enabled
3 participants